<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>{$menu_info['name']} - {:config('basic.title')}</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta content="" name="keywords" content="{:config('basic.keywords')}" />
    <meta content="" name="description" content="{:config('basic.description')}" />
    <meta content="" name="author" />

    <!-- ================== BEGIN BASE CSS STYLE ================== -->
    <link href="/static/template/assets/css/material/app.min.css" rel="stylesheet" />
    <!-- ================== END BASE CSS STYLE ================== -->
    <style>
        img {
            max-width: 100%;
        }

        table td,
        th {
            white-space: nowrap;
        }
    </style>
    {block name="head"}{/block}
</head>

<body class="">
    <!-- begin #page-container -->
    <div id="page-container" class="page-container page-sidebar-fixed page-header-fixed">
        <!-- begin #header -->
        <div id="header" class="header navbar-default">
            <!-- begin navbar-header -->
            <div class="navbar-header">
                <a href="{:addons_url('user://index/index')}" class="navbar-brand">
                    <img src="{:config('basic.logo')}" alt="{:config('basic.title')}" class="mr-2">
                    <b>{:config('basic.title')}</b></a>
                <button type="button" class="navbar-toggle" data-click="sidebar-toggled">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <!-- end navbar-header -->
            <div class="collapse navbar-collapse" id="top-navbar">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="javascript:layer.msg('插件市场正在开发中');">
                            <i class="fa fa-gem fa-fw mr-1 mr-md-0" style="display: inline-block;"></i> 插件市场
                        </a>
                    </li>
                </ul>
            </div>
            <!-- begin header-nav -->
            <ul class="navbar-nav navbar-right">
                <li class="dropdown navbar-user">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <div class="image image-icon bg-black text-grey-darker">
                            {if $user.avatar}
                            <img src="{$user.avatar}" alt="">
                            {/if}
                        </div>
                        <span class="d-none d-md-inline">
                            {$user.username}
                        </span> <b class="caret"></b>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a href="{:addons_url('user://index/edit',['id'=>$user['id']])}" class="dropdown-item">修改密码</a>
                        <div class="dropdown-divider"></div>
                        <a href="{:addons_url('user://login/out')}" class="dropdown-item">退出</a>
                    </div>
                </li>
            </ul>
            <!-- end header-nav -->
        </div>
        <!-- end #header -->

        <!-- begin #sidebar -->
        <div id="sidebar" class="sidebar">
            <!-- begin sidebar scrollbar -->
            <div data-scrollbar="true" data-height="100%">
                <!-- begin sidebar user -->
                <ul class="nav">
                    <li class="nav-profile">
                        <a href="javascript:;" data-toggle="nav-profile">
                            <div class="cover with-shadow"></div>
                            <div class="image image-icon bg-black text-grey-darker">
                                {if $user.avatar}
                                <img src="{$user.avatar}" alt="">
                                {/if}
                            </div>
                            <div class="info">
                                {$user.username}
                            </div>
                        </a>
                    </li>
                </ul>
                <!-- end sidebar user -->
                <!-- begin sidebar nav -->
                <ul class="nav">

                    <?php foreach($menu_list as $v):?>
                    <?php if(count($v['children'])==0):?>
                    <li class="{$v['active']?'active':''}">
                        <a href="
                        {:addons_url($v['url'],$v['optionss'])}">
                            <i class="{$v['icon']}"></i>
                            <span>
                                <?=$v['name']?>
                            </span>
                        </a>
                    </li>
                    <?php else:?>
                    <li class="has-sub {if $v['active']}expand active{/if}">
                        <a href="javascript:;">
                            <b class="caret"></b>
                            <i class="{$v['icon']}"></i>
                            <span>
                                <?=$v['name']?>
                            </span>
                        </a>
                        <ul class="sub-menu" style="display: {if $v['active']}block{/if};">
                            <?php foreach($v['children'] as $v1):?>
                            <?php if(count($v1['children'])==0):?>
                            <li class="{$v1['active']?'active':''}"><a href="
                                    {:addons_url($v1['url'],$v1['optionss'])}">
                                    <?=$v1['name']?>
                                </a></li>
                            <?php else:?>
                            <li class="has-sub {if $v1['active']}expand active{/if}">
                                <a href="javascript:;">
                                    <b class="caret"></b>
                                    <?=$v1['name']?>
                                </a>
                                <ul class="sub-menu" style="display: {if $v1['active']}block{/if};">
                                    <?php foreach($v1['children'] as $v2):?>
                                    <?php if(count($v2['children'])==0):?>
                                    <li class="{$v2['active']?'active':''}"><a href="
                                            {:addons_url($v2['url'],$v2['optionss'])}">
                                            <?=$v2['name']?>
                                        </a></li>
                                    <?php else:?>
                                    <li class="has-sub {if $v2['active']}expand active{/if}">
                                        <a href="javascript:;">
                                            <b class="caret"></b>
                                            <?=$v2['name']?>
                                        </a>
                                        <ul class="sub-menu" style="display: {if $v2['active']}block{/if};">
                                            <?php foreach($v2['children'] as $v3):?>
                                            <li class="{$v3['active']?'active':''}"><a href="
                                                    {:addons_url($v3['url'],$v3['optionss'])}">
                                                    <?=$v3['name']?>
                                                </a></li>
                                            <?php endforeach;?>
                                        </ul>
                                    </li>
                                    <?php endif;?>
                                    <?php endforeach;?>
                                </ul>
                            </li>
                            <?php endif;?>
                            <?php endforeach;?>
                        </ul>
                    </li>
                    <?php endif;?>
                    <?php endforeach;?>
                    <!-- begin sidebar minify button -->
                    <li><a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify"><i
                                class="fa fa-angle-double-left"></i></a></li>
                    <!-- end sidebar minify button -->
                </ul>
                <!-- end sidebar nav -->
            </div>
            <!-- end sidebar scrollbar -->
        </div>
        <div class="sidebar-bg"></div>
        <!-- end #sidebar -->

        <!-- begin #content -->
        <div id="content" class="content">
            <!-- begin breadcrumb -->
            <ol class="breadcrumb float-right">
                <li class="breadcrumb-item d-md-block d-none "><a href="{:url('index/index')}">首页</a></li>
                <?php foreach($menu_path as $v):?>
                <li class="breadcrumb-item d-md-block d-none "><a href="javascript:;">
                        {$v.name}
                    </a></li>
                <?php endforeach;?>
                <li class="breadcrumb-item active d-md-block d-none "><a href="javascript:;">
                        {$menu_info.name}
                    </a></li>
            </ol>
            <!-- end breadcrumb -->
            <!-- begin page-header -->
            <h1 class="page-header d-md-block d-none">
                {$menu_info.name}
                <small>{$menu_info.desc}</small>
            </h1>
            <!-- end page-header -->
            <!-- begin panel -->
            {block name="body"}{/block}
            <!-- end panel -->
        </div>
        <!-- end #content -->

        <!-- begin scroll to top btn -->
        <a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade"
            data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
        <!-- end scroll to top btn -->
    </div>
    <!-- end page container -->

</body>

<!-- ================== BEGIN BASE JS ================== -->
<script src="/static/template/assets/js/app.min.js"></script>
<script src="/static/template/assets/js/theme/material.min.js"></script>
<script src="/static/js/vue.js"></script>
<script src="/static/js/jquery.form.min.js"></script>
<script src="/static/layer/layer.js"></script>
<script src="/static/js/jsu.js"></script>
{block name="script"}{/block}

</html>